package calorie.com.calorie.adapter;

import android.support.annotation.Nullable;
import android.util.Log;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.lxh.baselibray.util.TimeUtils;

import java.util.List;

import calorie.com.calorie.R;
import calorie.com.calorie.response.ChargeDrawRecordResponce;


/**
 * 提充记录 adapter
 */
public class ChargeDrawRecordAdapter extends BaseQuickAdapter<ChargeDrawRecordResponce.DataBean,BaseViewHolder> {
    int type;
    public ChargeDrawRecordAdapter(int layoutResId, @Nullable List<ChargeDrawRecordResponce.DataBean> data, int type) {
        super(layoutResId, data);
        this.type=type;
    }

    @Override
    protected void convert(BaseViewHolder helper, ChargeDrawRecordResponce.DataBean item) {

        helper.setText(R.id.tv_type,type!=1?"充币":"提币")
                .setText(R.id.tv_time, TimeUtils.millis2String(item.getCreateTime()))
                .setText(R.id.tv_money,item.getTokenNum()+item.getTokenType());

    }
}
